package com.zsc.projectmanagementapi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zsc.projectmanagementapi.pojo.Do.ProjectState;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author LinHj
 * @date 2021/6/10 12:56
 **/
@Mapper
@Repository
public interface ProjectStateMapper extends BaseMapper<ProjectState> {


    List<ProjectState> getAllProjectState(@Param("projectName") String projectName,
                                          @Param("importance") Integer importance,
                                          @Param("sort") String sort);

    @Select("select * from project_state where deleted = 0 group by project_id asc")
    List<ProjectState> getAllProjectStateAsc();

    @Select("select * from project_state where deleted = 0 group by project_id desc")
    List<ProjectState> getAllProjectStateDesc();
}
